package cn.wolfcode.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LogoutController {
    @RequestMapping("/logout")
    public String logout(HttpSession session){
        //删除session
        //session.removeAttribute("USER_IN_SESSION");
        //销毁当前session
        session.invalidate();
        //跳转登陆界面
        return "redirect:/login.html";
    }
}
